<%@ page language="java" import="java.util.*,com.managerplat.*,com.managerplat.model.*, com.managerplat.dao.SellerDAO,com.managerplat.dao.impl.SellerDAOImpl" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.managerplat.dao.SellerDAO,com.managerplat.dao.impl.SellerDAOImpl"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
 String path = request.getContextPath();
 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>Insert title here</title>
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">

<!-- 可选的Bootstrap主题文件（一般不用引入） -->
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">

<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<script type="text/javascript">
function jsonListResult()
{
var xmlhttp;
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
	   var sellerList = eval('(' + xmlhttp.responseText + ')');
	   var result = "<table border=0>";  
	   result += "<tr><th>sellerId</th><th>Name</th><th >ImagePath</th><th >IDCardPath</th><th >Phone</th><th >操作</th></tr>";
	  $(sellerList).each(function (index) {
          var val = sellerList[index];
          result += "<tr>";   
	        result += "<td>"+val.sellerId +"</td>";   
	        result += "<td>"+val.sellerName+"</td>";   
	        result += "<td>"+val.sellerImagePath+"</td>"; 
	        result += "<td>"+val.sellerIDCardPath+"</td>";
	        result += "<td>"+val.sellerPhone+"</td>";
	        result += "<td><a href='/zzDDManagerPlat/confirm?sellerId="+val.sellerId+"'>确认</a>";
	        result += "<a href=\"javascript:if(confirm('是否删除?')){window.location.href='/zzDDManagerPlat/delete?id=${val.sellerId}'}\">【删除】</a></td>";
	        result += "</tr>";
      });
	  result += "</table>";   
	  document.getElementById('myDiv').innerHTML = result;
	    
    
    }
  }
xmlhttp.open("POST","/zzDDManagerPlat/get_unRig",true);
xmlhttp.send();
}
</script>
</head>  
<body>
<base href="<%=basePath%>">
<div id="myDiv"></div>  
    <input type="button" value="show list" onclick="jsonListResult();">  
</body>
</html>